package org.jfunction.test;

import java.util.ArrayList;
import java.util.List;

import org.jfunction.parser.ProblemHandler;
import org.jfunction.parser.Problem;

public class MyProblemCollector implements ProblemHandler {

	private final List<Problem> problems = new ArrayList<Problem>();
	
	@Override
	public void add(Problem problem) {
		problems.add(problem);
	}
	
	public Problem[] getProblems() {
		return problems.toArray(new Problem[0]);
	}
}
